package com.dfbz.demo01_缓存字节流;

import java.io.FileInputStream;
import java.io.InputStreamReader;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo02_转换输入流 {
    public static void main(String[] args) throws Exception {

        InputStreamReader isr = new InputStreamReader(new FileInputStream("C:\\Users\\Administrator\\Desktop\\day14.txt"), "UTF-8");

        char[] data = new char[1024];

        int len;
        while ((len = isr.read(data)) != -1) {
            System.out.println(new String(data, 0, len));
        }

        isr.close();
    }
}
